import {createRouter,createWebHashHistory} from 'vue-router';
import HomeIndex from '@/views/HomeIndex.vue';

// 路由对象
const router = createRouter({
  // mode:hash
  history:createWebHashHistory(),
  routes:[
    {
      path:'/home/index',
      component:HomeIndex
    },
    {
      path:'/shop/index',
      component:()=>import('@/views/ShopIndex.vue')
    },
    {
      path:'/cart/index',
      component:()=>import('@/views/CartIndex.vue')
    },
    {
      path:'/:match(.*)',
      component:()=>import('@/views/NotFound.vue')
    },
  ]
})


export default router;